package com.example.controller;

import com.example.domain.home;
import com.example.service.impl.homeServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@CrossOrigin
@RestController
public class homeController {

    @Autowired
    homeServiceImpl homeSerImpl;

    @GetMapping("/queryTitleData")
    public List<home> queryTitle(){
        home h = new home();
        String lay = "今日推荐";
        h.setLay_type(lay);
        List<home> homeList = homeSerImpl.queryTitle(h.getLay_type());
        return homeList;
    }

}
